//
//  ViewController4.swift
//  JKSwiftTest
//
//  Created by IronMan on 2020/9/14.
//  Copyright © 2020 Creditease. All rights reserved.
//

import UIKit

class ViewController4: UIViewController {

    fileprivate let viewModel = TestRequest()
    fileprivate lazy var disposeBag: DisposeBag = DisposeBag()
    
    override func viewDidLoad() {
        super.viewDidLoad()
        self.view.backgroundColor = .brown

        viewModel.refreshObersvable.asObserver().subscribe { (event: Event<Bool>) in
            print("哈哈")
        }.disposed(by: disposeBag)
        
    }
    
    override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
        viewModel.test()
    }

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destination.
        // Pass the selected object to the new view controller.
    }
    */

}
